The getQuantity method returns order's quantity.
var getQuantity();
This method returns quantity as a floating value.
The following example demonstrates the use of getQuantity() method.
function start()
{
//retrieve account's open orders
var account = getAccount();
var openOrders = account.getOrders();
//loop through all orders
for(var i = 0; i < openOrders.length, i++)
{
var order = openOrders[i];
//only process orders which are limit orders which have quantity greater than 1000
if(order.getOrderType() ==ORDERTYPE_LIMIT && order.getQuantity() > 1000)
{
//proceed...
}
}
//proceed further...
}
Copyright © 2006-2009 ActiveTick LLC